<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
    <sx:head />
    <style type="text/css">
		.buttonC{text-align: left}
		.pagetable{font-size:12px;}
	</style>
	<style type="text/css">@import "css/rep.css";</style>
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/rep.js"></script>
	<script type="text/javascript" src="js/repStyle.js"></script>
	<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
   </head>
承包方运输明细表
  <body>
   <s:form action="RepAction.action" method="post" theme="simple" onsubmit="return onsubmitcheck();">
   
   <table class="pagetable">
	   <tr>	  
	   		<td colspan=7>
		   		日期:<sx:datetimepicker name="queryCrt.startDate" displayFormat="yyyy-MM-dd" />
		   		       至<sx:datetimepicker name="queryCrt.endDate" displayFormat="yyyy-MM-dd" />
	   		
	   		    记录数：<s:textfield name="rowsPerPage"  style="width:30px;" /> /页
	   		    
	   		  </td>
	   	 							
		</tr>							
		<tr>
	   		<td>客户:<s:select label="选择采热地点" list="#session.company_list_custom"	name="queryCrt.toComId" listKey="id" listValue="comName"
							headerKey="-1" headerValue="%{#queryCrt.toComId}" emptyOption="false"/></td>
	   		<td>车辆：<s:select label="选择车辆" list="#session.car_list" name="queryCrt.carId" listKey="id" listValue="num" headerKey="-1"
							headerValue="%{#queryCrt.carId}" emptyOption="false" /></td>
	   		<td>充热地：<s:select label="选择采热地点" list="#session.company_list_suply"	name="queryCrt.fromComId" listKey="id" listValue="comName"
							headerKey="-1" headerValue="%{#queryCrt.fromComId}" emptyOption="false"/></td>
		
	   		<td>系统编号：<s:textfield name="queryCrt.num"  style="width:70px;"/></td>
	  
	   		<td>原始单号: <s:textfield name="queryCrt.transfNum"  style="width:70px;"/></td>
	   		<td>状态：	<s:select theme="simple" label="状态" list="#session.status_list" name="queryCrt.extA" listKey="id" listValue="name" headerKey=""
							headerValue="%{#queryCrt.extA}" emptyOption="false" />	</td>
							
	   		<td><s:submit value="查询" method="repTransfList" onclick='setfistpage()' /><input type=button value="导出" onclick="Copy2Excel(myTable)"></td>
	   		
	   </tr>
   </table>
   
    <table id="myTable" class="tablesorter">
 		<thead> 
	 		 <tr>
	 		 <td><input type="checkbox" id="selectall" />全选<!-- 全选 / 取消全选 -->
	 		 <s:hidden name="op" id="op" value="10"/></td>
	         <th>系统编号</th>
	         <th>运输原始单号</th>	          
	         <th>充热地点</th>         
	         <th>客户名称</th>
	         <th>车号</th>
	         <th>单价</th>  	                         
	         <th>数量</th>
	         <th>金额</th>
	         <th>里程表起</th>                
	         <th>里程表止</th>	        
	          <th>状态</th> 
	          <th>备注</th>                            
	         <td></td>
	         <td></td>
	        </tr>
        </thead>
       
        <tbody>
		       <s:iterator id="transfList" value="transfList" status="st">
			        <tr  onMouseOver="over2(this)"   onClick="change2(this)"   onMouseOut="out2(this)">
				        <td>
				        <s:checkbox theme="simple" name="extAttr3_status" fieldValue="%{id}" title="%{#st.index}" onclick="op_sum()"/>
				         <input type="hidden" name="extattr3" id="statusCode<s:property  value="id"/>" value="<s:property  value="extattr3"/>" ><!-- 采热单据的 审批状态-->				       
				      
				        </td>
				        
				         <td><s:property  value="busiInput.num"/> </td>
				         <td><s:property  value="tranNum"/> </td>
				          <td><s:property  value="fromComObj.comName"/>   </td>
				          <td><s:property  value="toComObj.comName"/>   </td>
				          <td><s:property  value="carObj.num"/></td>
				          
				         <td><s:property  value="price"/> </td>  <!-- 单价 -->   
				         
				         <td id="amount<s:property value="#st.index" />"><s:property  value="amount"/></td>
				         <td id="sum<s:property value="#st.index"/>"><s:property  value="sum"/> </td>
				          
				         <td><s:property  value="meterStart"/> </td>
				          <td><s:property  value="meterEnd"/> </td>
				         
				          <td><s:property  value="sellSts.name"/></td>     
				           <td><s:property  value="remark"/></td>                   
				         <td>
				          <a href="BusiAction!findbyid.action?id=<s:property value="extattr2"/>&appr=0&part=trsf&statusid=<s:property value="sellSts.id"/>&returnto=repTransfList&hxright=${userright.heXiaoOp}">编辑</a>
				         </td>
				         <td>
				         <!--  <a href="Price34Action!delete?id=<s:property value="id"/>">删除</a> -->
				         </td>
			        </tr>
		       </s:iterator>
		       <tr><td colspan=7>小计</td><td id="t_amount"></td><td id="t_sum"></td><td>操作金额：</td><td colspan=5 id="op_sum" style="color: red;">0</td></tr>
       </tbody>
    </table>
   
      
      <!-----------------------分页部分---------------------------------------->
      
      
		<table width="850" border="0" class="pagetable">
			  	<tr>
			    	<td>　				
								
							当前第<s:property value="page"/> 页,共<s:property value="planNum"/>条记录, 共分<s:property value="totalPage"/>页
					
				<input type="hidden" name="maxNum" value="">
			    	<input type="hidden" name="page" id="page" value="<s:property value="page"/>">
			    		
						<s:submit value="首页" onclick='setfistpage()' method="repTransfList"></s:submit>	
						<s:if test="page<=1">
						上一页
						</s:if>
						<s:else>
							<s:submit value="上一页" onclick='setlastpage(%{page})' method="repTransfList"></s:submit>		
							
						</s:else>
								
						<s:if test="page>=totalPage">
						 下一页
						</s:if>
					    <s:else>
						<s:submit value="下一页"  onclick='setnextpage(%{page})' method="repTransfList"></s:submit>	
				
					    </s:else>
						<s:submit value="尾页" onclick='settaltolpage(%{totalPage})' method="repTransfList"></s:submit>	
						
						</td>
					
			</table>
        <!-----------------------分页部分---------------------------- -->
        <p></p>
        
        <!----------------------- 审批操作部分 ----------------------->
        
    <table width="100%">
    <tr>
    	<td align="right">
		    	<s:if test='%{userright.fuHeOp=="0"}'>
			  		 <s:submit value="复核" onclick="setStatus(20)" method="updateApprovTransf"/><!-- 复核后为已复核状态 -->
			   </s:if>
			   <s:if test='%{userright.cancelFuHeOp=="0"}'>
			   		 &nbsp;&nbsp;<s:submit value="取消复核" onclick="setStatus(10)" method="updateApprovTransf"/><!-- 转为10 录入状态 -->
			   </s:if>
			   <s:if test='%{userright.heXiaoOp=="0"}'>
			   		&nbsp;&nbsp; <s:submit value="核销" onclick="setStatus(70)" method="updateApprovTransf"/><!-- 转为70 已正常核销状态 -->
			   </s:if>
			    <s:if test='%{userright.heXiaoAbnorOp=="0"}'>
			   		&nbsp;&nbsp;<s:submit value="异常核销" onclick="setStatus(30)" method="updateApprovTransf"/><!-- 转为30已 异常核销 状态 -->
			   	</s:if>
			    <s:if test='%{userright.cancelHeXiaoOp=="0"}'>
			   		&nbsp;&nbsp;<s:submit value="取消核销" onclick="setStatus(20)" method="updateApprovTransf"/><!-- 转为20已复核 状态 -->
			   	</s:if>
			   <s:if test='%{userright.qianPiOp=="0"}'>
			   		&nbsp;&nbsp;<s:submit value="签批" onclick="setStatus(90)" method="updateApprovTransf"/><!-- 转为90已签批状态 -->
			   </s:if>
			   <s:if test='%{userright.cancelQianPiOp=="0"}'>
			  		 &nbsp;&nbsp; <s:submit value="取消签批" onclick="setStatus(80)" method="updateApprovTransf"/>  <!-- 取消签批 状态变为已核销，核销包括：正常核销，异常核销，取消签批返回的核销 -->
			  	</s:if>
	  	</td>
   </tr>
      </table> 
      
        <!----------------------- 审批操作部分 ----------------------->
    </s:form>

  </body>
</html>
